<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<html>
<head>
	<title>患者列表</title>
	<script type="text/javascript">
    	function openPDiv(obj) {
    		
    		var dv = obj.parentNode.parentNode.parentNode;
    		
    		if(dv.children[1].style.visibility == "hidden") {
    			dv.style.height="90px";
    			dv.children[1].style.visibility ="visible";
    			obj.className="upArrow";
    		} else {
    			dv.style.height="30px";
    		    dv.children[1].style.visibility ="hidden";
    		    obj.className="downArrow";
    		}
    	}
    </script>
</head>

<body>
	<div style="width: 600px; padding-left: 5px">
		<s:iterator value="patientList">
		<div style="margin-top: 10px; padding:8px 0px 0px 5px; border: dashed 1px #777; height:30px">
			<div>
				<span style="width:40px"><font size="2px">姓名:</font></span>
				<span style="width:110px">${patientName}</span>
				<span style="width:40px"><font size="2px">性别:</font></span>
				<span style="width:110px">
					<s:if test="%{patientSex==1}">男</s:if>
					<s:elseif test="%{patientSex==0}">女</s:elseif></span>
				<span style="width:40px"><font size="2px">年龄:</font></span>
				<span style="width:110px">${patientAge}</span>
				<span style="width:40px;text-align:center">
					<a class="link" href="PatientShow?patientId=${patientId}">
						<font size="1px">详情</font>
					</a>
				</span>
				<span style="width:50px; text-align:right">
					<button onclick="openPDiv(this)" class="downArrow"></button>
				</span>
			</div>
			<div style="visibility: hidden">
				<div style="margin-top: 10px"> 
					<span style="width:65px"><font size="2px">身份证号:</font></span>
					<span style="width:250px">${PersonId}</span>
					<span style="width:40px"><font size="2px">电话:</font></span>
					<span style="width:200px">${patientTel}</span>
				</div>
				<div style="margin-top: 10px">
					<span style="width:65px"><font size="2px">家庭地址:</font></span>
					<span style="width:250px">${patientAdd}</span>
				</div>
			</div>
		</div>
		</s:iterator>
		
	</div>
</body>
</html>
